	.file "imul.s"
	
	.section .rodata
.LC0:
	.string "%d * %d = %d\n"

	.section .data
	.align 8
g_a:
	.long 200
g_b:
	.long 300
g_c:
	.long 400
g_d:
	.long 500
g_e:
	.long 600
g_f:
	.long 700

	.text
	.global main
	.type main, @function
main:
	pushq	%rbp
	movq 	%rsp, %rbp

	//imul  <src>
	movl	g_a(%rip), %eax
	imull	g_b(%rip)
	movl	g_a(%rip), %esi
	movl	g_b(%rip), %edx
	movl	%eax, %ecx
	leaq	.LC0(%rip), %rdi
	call	printf@PLT

	//imul	<src>, <dest>
	movl	g_c(%rip), %esi
	movl	g_d(%rip), %edx
	movl	%esi, %ecx
	imull	%edx, %ecx
	leaq	.LC0(%rip), %rdi
	call	printf@PLT

	//imul	<src>, <imm>, <dest>
	movl	g_e(%rip), %esi
	imull	$700, %esi, %ecx
	movl	$700, %edx
	leaq	.LC0(%rip), %rdi
	call	printf@PLT

	leave
	ret
